//package a02;
//
//import java.util.LinkedList;
//import java.util.List;
//
//import org.xml.sax.Attributes;
//import org.xml.sax.SAXException;
//import org.xml.sax.helpers.DefaultHandler;
//
//public class TournamentSAX extends DefaultHandler {
//
//    private String currentText;
//    private String desc = null;
//    private String name = null;
//    private String pl = null;
//    private List<TournamentPlayer> result = new LinkedList<TournamentPlayer>();
//
//    @Override
//    public void characters(char[] ch, int start, int length)
//	    throws SAXException {
//	this.currentText = this.currentText + new String(ch, start, length);
//    }
//
//    @Override
//    public void endElement(String uri, String localN, String qName)
//	    throws SAXException {
//
//	if (qName.equals("author")) {
//	    this.name = this.currentText;
//	} else if (qName.equals("description")) {
//	    this.desc = this.currentText;
//	} else if (qName.equals("class")) {
//	    this.pl = this.currentText;
//	} else if (qName.equals("player")) {
//	    this.getResult()
//		    .add(new TournamentPlayer(this.name, this.desc, this.pl));
//	    this.name = null;
//	    this.desc = null;
//	    this.pl = null;
//	}
//    }
//
//    @Override
//    public void startElement(String uri, String localName, String qName,
//	    Attributes attrs) throws SAXException {
//	this.currentText = "";
//    }
//
//    public List<TournamentPlayer> getResult() {
//	return result;
//    }
//
//    public void setResult(List<TournamentPlayer> result) {
//	this.result = result;
//    }
//}
